Page({
  editHouse () {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.query.id
    })
  },
  data: {
    detail: {}
  },
  onLoad (query) {
    console.log(query)
    this.query = query
    this.getDetail(query.id)
  },
  async getDetail (id) {
    const { data } = await wx.http.get(`/room/${id}`)
    console.log(data)
    this.setData({
      detail: data
    })
  }
})
